<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateMaterialReportTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('material_report', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('admin_id',false)->default(0)->comment('管理员id');
            $table->unsignedBigInteger('material_id',false)->default(0)->comment('材料id');
            $table->unsignedBigInteger('material_assign_id',false)->default(0)->comment('上报id');
            $table->unsignedBigInteger('material_project_id',false)->default(0)->comment('项目id');
            $table->string('path')->comment('附件路径');
            $table->string('file_type')->comment('附件类型');
            $table->string('file_size')->comment('附件大小');
            $table->string('file_name')->comment('附件名称');
            $table->string('storage_type')->nullable()->comment('存储方式');
            $table->timestamps();
            $table->softDeletes();
            $table->engine = "InnoDb";
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('material_report');
    }
}
